package com.qls.web.modules.op.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qls.core.entity.OpOurRateplan;
import com.qls.web.common.utils.PageUtils;
import com.qls.web.common.utils.Query;
import com.qls.web.modules.op.dao.OurRateplanDao;
import com.qls.web.modules.op.service.OurRateplanService;
import com.qls.web.modules.vo.RateplanVO;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


/**
 * @author doyoung
 */
@Service("ourRateplanService")
public class OurRateplanServiceImpl extends ServiceImpl<OurRateplanDao, OpOurRateplan> implements OurRateplanService {


    @Override
    public PageUtils sqlQueryPage(Map<String, Object> params) {
        IPage<RateplanVO> page = new Query<RateplanVO>().getPage(params);
        params.put("page", page);
        List<RateplanVO> list = baseMapper.sqlQueryPage(params);
        return new PageUtils(page, list);
    }

    @Override
    public List<Integer> queryIdByGroupId(Integer groupId) {
        return baseMapper.queryIdByGroupId(groupId);
    }
}